
BASE_STATION = "/data/cym/auto_sci_pipeline/workstation"

import meta_service.ucentre
# 保存原有的数据库
# ORI_GLOBAL_DB = meta_service.ucentre.GetGlobalDB()
# 更换全局数据库
meta_service.ucentre.ReInitGlobalDB("sqlite:///workstation/root.db")
from meta_service.ucentre import AnyLancer,ExecuteSQL,AnyTag
from app.researcher import AppRun,Date,Today

from meta_service.webdav import GetDefaultDavClient
from meta_service.tistore import MAIN_TIS


client = GetDefaultDavClient()
topic_handle = MAIN_TIS.GetTopicHandle("KG.title-hallu")

import os
for handle in topic_handle.GetIndexHandleList():
    path = handle.GetIndexPath()
    name = handle.GetIndexName()
    print(path)
    print(name)
    new_path = os.path.join("/kghallu",name)
    print(new_path)
    client.upload_file(path,new_path)

